package com.fs;

public class FinalResult {
	private String[] invoice;
	private Result[] result;
	private boolean finalResult = true;
	
	public FinalResult(String[] invoice, Result[] result) {
		this.invoice = invoice;
		this.result = result;
		calculateFinalResult();
	}

	private void calculateFinalResult() {
		for (Result res:result) {
			if (!res.isOk()) {
				this.finalResult = false;
				break;
			}
		}
	}

	public String[] getInvoice() {
		return invoice;
	}

	public void setInvoice(String[] invoice) {
		this.invoice = invoice;
	}

	public Result[] getResult() {
		return result;
	}

	public void setResult(Result[] result) {
		this.result = result;
	}

	public boolean getFinalResult() {
		return finalResult;
	}
	
}
